# class People:
#     def __init__(self, name, age):
#         self.name = name
#         self.__age = age
#     def __sayHello(self):
#         print('Holle，大家好')
#     def greeting(self):
#         self.__sayHello()
#     def getAge(self):
#         return self.__age
# xiaolan = People('小蓝', 10)
# xiaolan.greeting()
# print('我叫{}，今年{}岁了。'.format(xiaolan.name,xiaolan.getAge()))

class Animal:
    type = '动物'
    food = '食物'
    def eat(self):
        print('{}吃{}'.format(self.type, self.food))
class Cat(Animal):
    pass
cat = Cat()
cat.eat()
cat.type = '猫'
cat.food = '鱼'
cat.eat()